package com.example.demo.设计模式.代理模式.动态代理.CGLIB代理;

/**
 * @description:
 * @projectName:demo
 * @see:设计模式.代理模式.动态代理.CGLIB代理
 * @author:袁成龙
 * @createTime:2020/10/12 20:09
 * @version:1.0
 */
public class TestCGLIB {
    //CGLIB性能比JDK动态代理性能好

    public static void main(String[] args) {

       /* TestCGLIB01 testCGLIB01 = new TestCGLIB01();

        TestHeader<TestCGLIB01> testCGLIB01TestHeader = new TestHeader<>(testCGLIB01);

        TestCGLIB01 object = testCGLIB01TestHeader.getObject(TestCGLIB01.class);



        System.out.println(object.test());*/


        TestInterfaceIMpl<TestCGLIBInterface> testInterfaceIMpl = new TestInterfaceIMpl<>();
        TestCGLIBInterface object = testInterfaceIMpl.getObject(TestCGLIBInterface.class);
        System.out.println(object.test());

    }

}